package com.disease.api.service.entity.eumns;

public enum DeathSystemStatusCodeEnum {
    AWAIT_PHC_REVIEW("2","待公卫科审核",StatusEnum.AWAIT_PHC_REVIEW),

    AWAIT_CDC_REVIEW("3","待疾控审核",StatusEnum.AWAIT_CDC_REVIEW),

    APPROVED("1","已审核",StatusEnum.APPROVED),

    PENDING_CANCEL("4","注销待审核",StatusEnum.PENDING_CANCEL),

    CANCEL_REJECTED("5","注销审核未通过",StatusEnum.CANCEL_REJECTED),

    RETURN("9","退回修改",StatusEnum.RETURN);

    private String code;

    private String name;

    private StatusEnum status;

    DeathSystemStatusCodeEnum(String code, String name, StatusEnum status) {
        this.code = code;
        this.name = name;
        this.status = status;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public StatusEnum getStatus() {
        return status;
    }

    public static StatusEnum getStatusByCode(String code) {
        for (DeathSystemStatusCodeEnum value : DeathSystemStatusCodeEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getStatus();
            }
        }
        return null;
    }
}
